package cn.dd.crmweb.modules.sys.mapper;

import cn.dd.crmweb.modules.sys.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<Role> {

    @Select("select rolename from sys_role where rolecode= #{roleCode}")
    List<String> selectByRoleCode(@Param("roleCode") String roleCode);

    @Select(("select id from sys_role where rolecode = #{flag}"))
    String selectByFlag(@Param("flag") String flag);
}
